<?php

namespace Flow\models;

class XhflowProcess extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iProId;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sName;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sTag;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iNodeNum;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sRemark;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iLastModifyUserId;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        parent::initialize();
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHFlow_Process';
    }

//    public function columnMap()
//    {
//        return [
//            'iProId'    => 'id',
//            'sName'     => 'name',
//            'sTag'      => 'tag',
//            'iNodeNum'  => 'nodeNum',
//            'sRemark'   => 'remark',
//            'bDelete'   => 'bDelete',
//        ];
//    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhflowProcess[]|XhflowProcess
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhflowProcess
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
